/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ServerGUI;
import java.awt.*;
import java.util.LinkedList;
/**
 *
 * @author cypek
 */
public class ServerGUIGFX {

    public static Image numer0,numer1,numer2,numer3,numer4,numer5,numer6,numer7,numer8,numer9;
    public static Image numer0a,numer1a,numer2a,numer3a,numer4a,numer5a,numer6a,numer7a,numer8a,numer9a;
    public static Image floor, cabin, icon, arrowUp, arrowDown, iconB, wat;
    private LinkedList<Image> imageList = new LinkedList<Image>();
    private LinkedList<Image> imageListA = new LinkedList<Image>();


    public ServerGUIGFX() {
        loadAllImages();
    }

    public LinkedList<Image> getImageListA() {
        return imageListA;
    }

    public void setImageListA(LinkedList<Image> imageListA) {
        this.imageListA = imageListA;
    }



    public LinkedList<Image> getImageList() {
        return imageList;
    }

    public void setImageList(LinkedList<Image> imageList) {
        this.imageList = imageList;
    }

    public float resizeWidth(Image image, float scale)
    {
        return image.getWidth(null) * scale;
    }


    public float resizeHeight(Image image, float scale)
    {
        return image.getHeight(null) * scale;
    }

        public void loadAllImages(){
        numer0 = loadImage("/graphics/server/0.png");
        numer1 = loadImage("/graphics/server/1.png");
        numer2 = loadImage("/graphics/server/2.png");
        numer3 = loadImage("/graphics/server/3.png");
        numer4 = loadImage("/graphics/server/4.png");
        numer5 = loadImage("/graphics/server/5.png");
        numer6 = loadImage("/graphics/server/6.png");
        numer7 = loadImage("/graphics/server/7.png");
        numer8 = loadImage("/graphics/server/8.png");
        numer9 = loadImage("/graphics/server/9.png");

        imageList.add(numer0);
        imageList.add(numer1);
        imageList.add(numer2);
        imageList.add(numer3);
        imageList.add(numer4);
        imageList.add(numer5);
        imageList.add(numer6);
        imageList.add(numer7);
        imageList.add(numer8);
        imageList.add(numer9);

        numer0a = loadImage("/graphics/server/0_active.png");
        numer1a = loadImage("/graphics/server/1_active.png");
        numer2a = loadImage("/graphics/server/2_active.png");
        numer3a = loadImage("/graphics/server/3_active.png");
        numer4a = loadImage("/graphics/server/4_active.png");
        numer5a = loadImage("/graphics/server/5_active.png");
        numer6a = loadImage("/graphics/server/6_active.png");
        numer7a = loadImage("/graphics/server/7_active.png");
        numer8a = loadImage("/graphics/server/8_active.png");
        numer9a = loadImage("/graphics/server/9_active.png");

        floor = loadImage("/graphics/server/floor.png");
        cabin = loadImage("/graphics/server/cabin.png");
        icon  = loadImage("/graphics/server/icon.png");
        iconB  = loadImage("/graphics/server/icon_b.png");
        arrowUp = loadImage("/graphics/server/arrow_up.png");
        arrowDown = loadImage("/graphics/server/arrow_down.png");
        wat = loadImage("/graphics/server/wat.png");

        imageListA.add(numer0a);
        imageListA.add(numer1a);
        imageListA.add(numer2a);
        imageListA.add(numer3a);
        imageListA.add(numer4a);
        imageListA.add(numer5a);
        imageListA.add(numer6a);
        imageListA.add(numer7a);
        imageListA.add(numer8a);
        imageListA.add(numer9a);
    }

    private Image loadImage (String pad){
        return Toolkit.getDefaultToolkit().getImage(getClass().getResource(pad));
    }

}
